﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace Demo16_1_6
{
    internal class Program
    {
        [DllImport("Demo16-1-7.dll", CallingConvention = CallingConvention.StdCall)]
        public extern static void InitData(int str);
        static void Main(string[] args)
        {
            var task = Task.Factory.StartNew(() =>
            {
                for (int i = 0; i < int.MaxValue; i++) 
                {
                    Task.Delay(1000);
                    InitData(10000);
                    Console.WriteLine("i为"+i);
                }

            });
            Console.ReadLine();
        }
    }
}
